// 如果没有通过拦截器配置域名的话，可以在这里写上完整的URL(加上域名部分)
// 例
// // tokenUrl
// let tokenUrl = ''

// 首页文章资讯Url
let ArticleListUrl = '/api/articles/ArticleList'
// 文章详情
let getArticleDetailUrl = '/api/articles/getArticleDetail'
// 精选产品Url
let getListUrl = '/api/goods/getList'
// 首页bannerUrl
let getBannerListUrl = '/api/banner/getBannerList'
// 小程序登录Url
let wxapploginUrl = '/api/user/wxapplogin'
// 获取用户信息Url
let infoUrl = '/api/user/info'
// 获取商城分类Url
let getallcatUrl = '/api/categories/getallcat'
// 获取商城首页分类Url
let getcatUrl = '/api/categories/getcat'
// 获取购物车(登录使用)Url
let getCartlistUrl = '/api/cart/getlist'
// 修改购物车数量Url
let setnumsUrl = '/api/cart/setnums'
// 获取订单状态数量Url
let getorderstatusnumUrl = '/api/order/getorderstatusnum'
// 地址管理Url
let getusershipUrl = '/api/user/getusership'
// 获取单条地址信息Url
let getshipdetailUrl = '/api/user/getshipdetail'
// 获取省市级联动列表Url
let getarealistUrl = '/api/user/getarealist'
// 地址新增或编辑Url
let editShipUrl = '/api/user/editShip'
// 删除地址Url
let removeshipUrl = '/api/user/removeship'
// 商城订单列表Url
let getorderlistUrl = '/api/order/getorderlist'
// 回收预约Url
let recoverAddUrl = '/api/recover/add'
let recoverAddNewUrl = '/api/recover/new_add'
// 添加购物车Url
let cartAddUrl = '/api/cart/add'
// 商品详情Url
let productDetailUrl = '/api/goods/getdetial'
// 商城首页幻灯片Url
let getAdvertListUrl = '/api/Advert/getAdvertList'
// 获取默认地址Url
let getuserdefaultshipUrl = '/api/user/getuserdefaultship'
// 提交结算Url
let orderCreateUrl = '/api/order/create'
// 回收订单列表Url
let getreclistUrl = '/api/recover/getreclist'
// 分类指南Url
let getCategorUrl = '/api/articles/categor'
// 客服中心数据获取Url
let getMessageUrl = '/api/message/message'
// 获取物品列表Url
let wptypelistUrl = '/api/recover/wptypelist'
// 获取物品列表Url
let newWptypelistUrl = '/api/recover/newwptypelist'
// 提交问题Url
let addmessageUrl = '/api/message/addmessage'
// 余额明细Url
let userBalanceUrl = '/api/user/userBalance'
// 余额支付商定订单Url
let userOrderPayUrl = '/api/user/pay'
// 取消商定订单Url
let orderCancelUrl = '/api/order/cancel'
// 回收订单编辑Url
let recoverEditUrl = '/api/recover/edit'
// 接单列表Url
let recoverListUrl = '/api/recover/recoverList'
// 接单按钮Url
let receivingUrl = '/api/recover/receiving'
let cancelHangUrl = '/api/recover/cancel_hang_item'



// 回收订单完成Url
let completeUrl = '/api/recover/new_complete'
// 回收订单取消Url
let cancelUrl = '/api/recover/cancel'
// 删除购物车Url
let cartDelUrl = '/api/cart/del'
// 修改用户资料Url
let editinfoUrl = '/api/user/editinfo'
// 用户分享链接Url
let myinviteUrl = '/api/user/myinvite'
// 银行卡列表Url
let getbankcardlistUrl = '/api/user/getbankcardlist'
// 新增银行卡Url
let addBankCardUrl = '/api/user/addBankCard'
// 删除银行卡Url
let removebankcardUrl = '/api/user/removebankcard'
// 判断银行卡号是否正确Url
let getbankcardorganizationUrl = '/api/user/getbankcardorganization'
// 提现接口Url
let cashUrl = '/api/user/cash'
// 删除物品Url
let recoverDelUrl = '/api/recover/del'
// 联想数据Url
let defaultdataUrl = '/api/recover/defaultdata'
// 设置支付密码Url
let zhifupassUrl = '/api/user/zhifupass'
// 验证支付密码Url
let checkPassword = '/api/user/checkPassword'
// 设置支付密码Url
let editPwdUrl = '/api/user/editPwd'
// 回收站点申请Url
let createServerUrl = '/api/user/create_server'
// 用户如分销商类型申请Url
let changUserTypeUrl = '/api/user/chang_user_type'
// 分销商查看订单和分佣数据Url
let getFenxiaoOrderUrl = '/api/recover/get_fenxiao_order'
// 回收员端增加平台抽佣记录Url
let getHsAmountUrl = '/api/recover/get_hs_amount'
// 订单明细查看回收员订单详情和抽佣情况Url
let orderDetailUrl = '/api/recover/order_detail'
// 获取回收员订单统计Url
let hsStatisticsUrl = '/api/recover/hs_statistics'
// 虚拟用户列表Url
let getVuserUrl = '/api/user/get_vuser'
//分站下单获取地磅列表
let WeighbridgeListApiUrl = '/api/Services/lands'
// 删除挂起订单
let postDele_orderUrl = '/api/recover/hang_del'
let getPayTestUrl = '/api/recover/paytest'
let getHangInfoUrl = '/api/recover/hang_info'
let getHangListUrl = '/api/recover/hang_list'
let getCouListUrl = '/api/recover/getCouList'
let postHangAddUrl = '/api/recover/hang_add'
let RepairListUrl = '/api/recover/repair_list'
let RepairPrintUrl = '/api/recover/repair_print'
let Point = '/api/cart/point_proportion'
let UserPoint = '/api/user/userPointLog'

//20220905个人挂起订单列表
let getPersonHangListUrl = '/api/recover/person_hangs'
let recycledHangDelUrl = '/api/recover/recycled_hang_del'
let recoverBuildUrl = '/api/recover/build'
let getScanListUrl = '/api/recover/scan_list'
let postHangScanUrl = '/api/recover/hang_scan'
let postTWeightUrl = '/api/recover/get_tweight'
let postSBalanceUrl = '/api/recover/set_balance'
let getServerWeightUrl = '/api/others/server2weight'
//2023/3/15
let getServicePointListUrl = '/api/service/service_point'
let serviceStatisticsUrl = '/api/services/service_statistics'
let serviceWpUrl = '/api/services/service_wp'
let serviceReceiptUrl = '/api/services/service_receipt'
let addserviceReceiptUrl = '/api/services/service_receipt_create'
let getServiceInitUrl = '/api/services/service_init'
let getServiceInReceiptUrl = '/api/services/service_in_receipt'
let toReceiveReceiptUrl = '/api/services/service_receive_receipt'
let getServiceReceiptInfoUrl = '/api/services/service_receipt_info'
let getUserTeamUrl = '/api/user/team'

let postCarUrl = "/api/user_car/save"
let getCarUrl = "/api/user_car/list"
let postUserCarUrl = "/api/user_car/user_car_info"
let postExchangeUrl = "/api/point/exchange"
let showQrcodeUrl = "/api/order/showQrcode"

let getorderItemUrl = "/api/order/getOrderItem"
let checkOrderItemUrl = "/api/order/checkOrderItem"

let getNewStorageListUrl = "/api/services/newStorageList"

// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作，更多内容详见uView对拦截器的介绍部分：
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
const install = (Vue, vm) => {
    // 例 get
    // // token函数
    // let getToken = (params = {}) => vm.$u.get(tokenUrl);
    // 首页文章资讯函数
    let getArticleList = (params = {}) => vm.$u.get(ArticleListUrl, params);
    // 精选产品函数
    let getList = (params = {}) => vm.$u.get(getListUrl, params);
    // 首页banner函数
    let getBannerList = (params = {}) => vm.$u.get(getBannerListUrl, params);
    // 获取用户信息函数
    let getInfo = (params = {}) => vm.$u.get(infoUrl, params);
    // 获取商城分类函数
    let getallcat = (params = {}) => vm.$u.get(getallcatUrl, params);
    // 获取商城首页分类函数
    let getcat = (params = {}) => vm.$u.get(getcatUrl, params);
    // 获取订单状态数量函数
    let getorderstatusnum = (params = {}) => vm.$u.get(getorderstatusnumUrl, params);
    // 地址管理函数
    let getusership = (params = {}) => vm.$u.get(getusershipUrl, params);
    // 获取单条地址信息函数
    let getshipdetail = (params = {}) => vm.$u.get(getshipdetailUrl, params);
    // 获取省市级联动列表函数
    let getarealist = (params = {}) => vm.$u.get(getarealistUrl, params);
    // 商城订单列表函数
    let getorderlist = (params = {}) => vm.$u.get(getorderlistUrl, params);
    // 商城首页幻灯片函数
    let getAdvertList = (params = {}) => vm.$u.get(getAdvertListUrl, params);
    // 获取默认地址函数
    let getuserdefaultship = (params = {}) => vm.$u.get(getuserdefaultshipUrl, params);
    // 回收订单列表函数
    let getreclist = (params = {}) => vm.$u.get(getreclistUrl, params);
    // 分类指南函数
    let getCategor = (params = {}) => vm.$u.get(getCategorUrl, params);
    // 客服中心数据获取函数
    let getMessage = (params = {}) => vm.$u.get(getMessageUrl, params);
    // 获取物品列表函数
    let getwptypelist = (params = {}) => vm.$u.get(wptypelistUrl, params);
	// 获取物品位置列表函数
	let getnewwptypelist = (params = {}) => vm.$u.get(newWptypelistUrl, params);
    // 余额明细函数
    let getuserBalance = (params = {}) => vm.$u.get(userBalanceUrl, params);
    // 接单列表函数
    let getRecoverList = (params = {}) => vm.$u.get(recoverListUrl, params);
    // 用户分享链接函数
    let getMyinvite = (params = {}) => vm.$u.get(myinviteUrl, params);
    // 银行卡列表函数
    let getbankcardlist = (params = {}) => vm.$u.get(getbankcardlistUrl, params);
    // 联想数据函数
    let getDefaultdata = (params = {}) => vm.$u.get(defaultdataUrl, params);
    // 分销商查看订单和分佣数据数
    let getFenxiaoOrder = (params = {}) => vm.$u.get(getFenxiaoOrderUrl, params);
    // 回收员端增加平台抽佣记录函数
    let getHsAmount = (params = {}) => vm.$u.get(getHsAmountUrl, params);
    // 订单明细查看回收员订单详情和抽佣情况函数
    let getOrderDetail = (params = {}) => vm.$u.get(orderDetailUrl, params);
    // 获取回收员订单统计
    let getHsStatistics = (params = {}) => vm.$u.get(hsStatisticsUrl, params);
    // 虚拟用户
    let getVuser = (params = {}) => vm.$u.get(getVuserUrl, params);
    //服务点
    let getServicePointList = (params = {}) => vm.$u.post(getServicePointListUrl, params);

    let getWeighbridgeListApi = (params = {}) => vm.$u.get(WeighbridgeListApiUrl, params)

    let getPayTest = (params= {}) => vm.$u.get(getPayTestUrl,params);

    //挂起详情
    let getHangInfo = (params = {}) => vm.$u.get(getHangInfoUrl, params);

    //挂起列表
    let getHangList = (params = {}) => vm.$u.get(getHangListUrl, params);
    //20220905
    let getPersonHangs = (params = {}) => vm.$u.get(getPersonHangListUrl, params);
    let postRecycledHangDel = (params = {}) => vm.$u.post(recycledHangDelUrl, params);
    let postRecoverBuild = (params = {}) => vm.$u.post(recoverBuildUrl, params);
    let getScanList = (params = {}) => vm.$u.get(getScanListUrl, params);
    let postHangScan = (params = {}) => vm.$u.post(postHangScanUrl, params);
    let postTableWeight = (params = {}) => vm.$u.post(postTWeightUrl, params);
    let postSetSBalance = (params = {}) => vm.$u.post(postSBalanceUrl, params);
    let getServer2weight = (params = {}) => vm.$u.get(getServerWeightUrl, params);

    let getCouList = (params = {}) => vm.$u.get(getCouListUrl, params);

    let getRepairList = (params = {}) => vm.$u.get(RepairListUrl, params);

    let getPoint = (params = {}) => vm.$u.get(Point, params);

    let getUserPoint = (params = {}) => vm.$u.get(UserPoint, params);

    // 例 post
    // // token函数
    // let postToken = (params = {}) => vm.$u.post(tokenUrl, params)
    // 小程序登录函数
    let postWxapplogin = (params = {}) => vm.$u.post(wxapploginUrl, params)
    // 获取购物车函数
    let postGetCartList = (params = {}) => vm.$u.post(getCartlistUrl, params)
    // 修改购物车数量函数
    let postSetnums = (params = {}) => vm.$u.post(setnumsUrl, params)
    // 地址新增或编辑函数
    let postEditShip = (params = {}) => vm.$u.post(editShipUrl, params)
    // 删除地址函数
    let postRemoveship = (params = {}) => vm.$u.post(removeshipUrl, params)
    // 回收预约函数
    let postRecoverAdd = (params = {}) => vm.$u.post(recoverAddUrl, params)
	// 回收预约函数
	let postRecovernAddNew = (params = {}) => vm.$u.post(recoverAddNewUrl, params)
    // 添加购物车函数
    let postCartAdd = (params = {}) => vm.$u.post(cartAddUrl, params)
    // 商品详情函数
    let postProductDetai = (params = {}) => vm.$u.post(productDetailUrl, params)
    // 文章详情函数
    let postArticleDetail = (params = {}) => vm.$u.post(getArticleDetailUrl, params);
    // 提交结算函数
    let postOrderCreate = (params = {}) => vm.$u.post(orderCreateUrl, params);
    // 提交问题函数
    let postAddmessage = (params = {}) => vm.$u.post(addmessageUrl, params);
    // 余额支付商定订单函数
    let postUserOrderPay = (params = {}) => vm.$u.post(userOrderPayUrl, params);
    let checkUserPayPassword = (params = {}) => vm.$u.post(checkPassword, params);
    // 取消订单函数
    let postOrderCancel = (params = {}) => vm.$u.post(orderCancelUrl, params);
    // 回收编辑函数
    let postRecoverEdit = (params = {}) => vm.$u.post(recoverEditUrl, params);
    // 接单按钮函数
    let postReceiving = (params = {}) => vm.$u.post(receivingUrl, params);
	
	let postCancelHang = (params = {}) => vm.$u.post(cancelHangUrl, params);
	
    // 回收订单完成函数
    let postComplete = (params = {}) => vm.$u.post(completeUrl, params);
    // 回收订单取消函数
    let postCancel = (params = {}) => vm.$u.post(cancelUrl, params);
    // 删除购物车函数
    let postCartDel = (params = {}) => vm.$u.post(cartDelUrl, params);
    // 修改用户资料函数
    let postEditinfo = (params = {}) => vm.$u.post(editinfoUrl, params);
    // 提现接口函数
    let postCash = (params = {}) => vm.$u.post(cashUrl, params);
    // 新增银行卡函数
    let postAddBankCard = (params = {}) => vm.$u.post(addBankCardUrl, params);
    // 删除银行卡函数
    let postRemovebankcard = (params = {}) => vm.$u.post(removebankcardUrl, params);
    // 判断银行卡号是否正确函数
    let postBankcardorganization = (params = {}) => vm.$u.post(getbankcardorganizationUrl, params);
    // 编辑删除物品函数
    let postRecoverDel = (params = {}) => vm.$u.post(recoverDelUrl, params);
    // 设置支付密码函数
    let postZhifupass = (params = {}) => vm.$u.post(zhifupassUrl, params);
    // 修改支付密码函数
    let postEditPwd = (params = {}) => vm.$u.post(editPwdUrl, params);
    // 回收站点申请函数
    let postCreateServer = (params = {}) => vm.$u.post(createServerUrl, params);
    // 用户如分销商类型申请函数
    let postChangUserType = (params = {}) => vm.$u.post(changUserTypeUrl, params);

    //挂起订单
    let postHangAdd = (params = {}) => vm.$u.post(postHangAddUrl, params);
    let postRepairPrint = (params = {}) => vm.$u.post(RepairPrintUrl, params);
    // 删除挂起订单
    let postDele_order = (params = {}) => vm.$u.post(postDele_orderUrl, params);

    //2023/3/15
    let getServiceStatistics = (params = {}) => vm.$u.post(serviceStatisticsUrl, params);
    let getServiceWp = (params = {}) => vm.$u.post(serviceWpUrl, params);
    let postServiceReceipt = (params = {}) => vm.$u.post(serviceReceiptUrl, params);
    let addServiceReceipt = (params = {}) => vm.$u.post(addserviceReceiptUrl, params);
    let getServiceInit = (params = {}) => vm.$u.post(getServiceInitUrl, params);
    let getServiceInReceipt = (params = {}) => vm.$u.post(getServiceInReceiptUrl, params);
    let toReceiveReceipt = (params = {}) => vm.$u.post(toReceiveReceiptUrl, params);
    let getServiceReceiptInfo = (params = {}) => vm.$u.post(getServiceReceiptInfoUrl, params);
    let getUserTeam = (params = {}) => vm.$u.post(getUserTeamUrl, params);

    //车辆信息
    let getCarList = (params = {}) => vm.$u.post(getCarUrl, params);
    let postCar = (params = {}) => vm.$u.post(postCarUrl, params);
    let userCarInfo = (params = {}) => vm.$u.post(postUserCarUrl, params);
    let postExchange = (params = {}) => vm.$u.post(postExchangeUrl, params);
	let showQrcode = (params = {}) => vm.$u.post(showQrcodeUrl, params);
	let getorderItem = (params = {}) => vm.$u.post(getorderItemUrl, params);
	
	let checkOrderItem = (params = {}) => vm.$u.post(checkOrderItemUrl, params);
	
	// 2024年2月5日17:51:17
	let getNewStorageList = (params = {}) => vm.$u.get(getNewStorageListUrl, params);

    // 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
    vm.$u.api = {
        // get
        // getToken // 例
        getArticleList,
        getList,
        getBannerList,
        getInfo,
        getallcat,
        getcat,
        getorderstatusnum,
        getusership,
        getshipdetail,
        getarealist,
        getorderlist,
        getAdvertList,
        postArticleDetail,
        getuserdefaultship,
        getreclist,
        getCouList,
        getCategor,
        getMessage,
        getwptypelist,
		getnewwptypelist,
        getuserBalance,
        getRecoverList,
        getMyinvite,
        getbankcardlist,
        getDefaultdata,
        getFenxiaoOrder,
        getHsAmount,
        getOrderDetail,
        getHsStatistics,
        getVuser,
        getHangInfo,
        getHangList,
        getRepairList,
        getPoint,
        getUserPoint,
        getPersonHangs, //20220905
        postRecycledHangDel,
        postRecoverBuild,
        getScanList,
        postHangScan,
        postTableWeight,
        postSetSBalance,
        getServer2weight,

        // post
        // postToken // 例
        postWxapplogin,
        postGetCartList,
        postSetnums,
        postEditShip,
        postRemoveship,
        postRecoverAdd,
        postCartAdd,
        postProductDetai,
        postOrderCreate,
        postAddmessage,
        postUserOrderPay,
        postOrderCancel,
        postRecoverEdit,
        postReceiving,
        postComplete,
        postCancel,
        postCartDel,
        postEditinfo,
        postCash,
        postAddBankCard,
        postRemovebankcard,
        postBankcardorganization,
        postRecoverDel,
        postZhifupass,
        postEditPwd,
        postCreateServer,
        postChangUserType,
        postHangAdd,
        postRepairPrint,
        checkUserPayPassword,
        //2023/3/15
        getServicePointList,
        getServiceStatistics,
        getServiceWp,
        postServiceReceipt,
        addServiceReceipt,
        getServiceInit,
        getServiceInReceipt,
        toReceiveReceipt,
        getServiceReceiptInfo,
        getUserTeam,
        getWeighbridgeListApi,
        postDele_order,
        getPayTest,
        postCar,
        getCarList,
        userCarInfo,
		postRecovernAddNew,
		postCancelHang,
		postExchange,
		showQrcode,
		getorderItem,
		checkOrderItem,
		getNewStorageList
    };
}

export default {
    install
}